import adb_utils


def main():
    devices = adb_utils.command_devices()
    for device in devices:
        adb_utils.command_shellcmd(
            device, "rm -rf /data/log/hilogs/*", check=False)
        adb_utils.command_shellcmd(
            device, "rm -rf /data/log/faultlog/*", check=False)
        adb_utils.command_shellcmd(
            device, "rm -rf /data/log/dropbox/*", check=False)
        adb_utils.command_shellcmd(
            device, "rm -rf /data/tombstones/*", check=False)
        adb_utils.command_shellcmd(
            device, "rm -rf /data/log/bt/*", check=False)
    adb_utils.dump_timestamp("clean log finished")


if __name__ == "__main__":
    main()
